Skip to content

Gate CUDA 12.8 features using runtime versions#12

Merged
shinaoka merged 1 commit into
mainfrom
codex/cuda-runtime-version-gating
Jul 18, 2026
Merged

Gate CUDA 12.8 features using runtime versions#12
shinaoka merged 1 commit into
mainfrom
codex/cuda-runtime-version-gating

Conversation

@shinaoka

Copy link
Copy Markdown
Member

Summary

  • detect the loaded CUDA driver and NVRTC versions during CUDA server initialization
  • advertise CUDA 12.8-only compiler and tensor-map capabilities only when both runtime components are at least 12.8
  • reject 12.8-only tensor-map requests before cudarc attempts to resolve unavailable driver symbols

Why

The CUDA backend previously used cudarc's compile-time CUDA_VERSION as if it described the target machine. With CUDA 12.8 bindings, a machine running a CUDA 12.4 driver and NVRTC could therefore advertise and call 12.8-only functionality.

cudarc resolves dynamic driver symbols lazily, so retaining the 12.8 binding set is compatible with older runtimes as long as newer capabilities are gated using the actual loaded driver and NVRTC. This keeps the baseline path usable on CUDA 12.4 while preserving the complete hardware-supported feature set on CUDA 12.8 and newer environments.

Validation

  • cargo fmt --all --check
  • cargo test -p t4a-cubecl-cuda --test cudarc_feature_contract
  • cargo test -p t4a-cubecl-cuda runtime::tests::cuda_12_8_capabilities_require_both_driver_and_nvrtc
  • cargo test -p t4a-cubecl-cuda --no-run

@shinaoka
shinaoka marked this pull request as ready for review July 18, 2026 05:20
@shinaoka
shinaoka merged commit f718904 into main Jul 18, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant